import java.awt.*;
import java.security.NoSuchAlgorithmException;
import javax.swing.*;
import java.security.MessageDigest;	// This is for security purposes

/*
 * Controls initialized the applet, and create the initial admin account
 */
public class Control extends JApplet {
	   private int APPLET_WIDTH = 550;
	   private int APPLET_HEIGHT = 550;
	   private Login lg;
	   private Member current;
	   private JTabbedPane tabs;
	  

       public void init()
        {
    	   
    	   MemberData fullList = new MemberData();
           //inits initial admin (as doctor) account
   Member admin = new Doctor("admin", "admin", Crypto.getHash("admin"), "admin", "admin", fullList.getSize());
           //adds account to list
   fullList.addMember(admin);
    //tabbed pane initialized
    tabs = new JTabbedPane();
    //adding login pane
    lg = new Login(current, fullList, tabs);
    tabs.addTab("Login" , lg);
    //adding tabbed pane
    getContentPane().add(tabs);

    setSize (APPLET_WIDTH, APPLET_HEIGHT); //set Applet size

         
         
    }
}